package com.sczmgk.hotline_pzh.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;

import com.sczmgk.hotline_pzh.R;
import com.sczmgk.hotline_pzh.widget.CircularImage;

/**
 * 头像控件
 * 
 */
public class HeadPortraitView extends RelativeLayout {

    public HeadPortraitView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public HeadPortraitView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init();
    }

    /**
     * 头像
     */
    private CircularImage headPortraitImageView;

    private void init() {
        View.inflate(getContext(), R.layout.head_portrait, this);
        headPortraitImageView = (CircularImage) findViewById(R.id.iv_me_image);
    }

    /**
     * 取得圆头像的控件
     * @return
     */
    public CircularImage getImageView() {
        return headPortraitImageView;
    }
}